﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
//using ERP_RORZE.Tool.Forms;
using ERP_RORZE_DLL;
using ERP_RORZE_SYSTEM;
using System.Data;
using System.Data.SqlClient;
using ERP_RORZE_PERMISSION.Base;
using ERP_RORZE_PERMISSION.Forms;
using ERP_RORZE_PRODUCT.Product.Incauhinhmoi;

namespace ERP_RORZE
{
    static class Program
    {        
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.Skins.SkinManager.EnableFormSkins();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            INISettings MySetting = new INISettings();
            
            if (MySetting.CheckDatabaseConnection())
            {                
                //Application.Run(new frm_Login());
                //Permission role = new Permission();
                //if (role.Is_Login())
                //{
                Application.Run(new MainForm());
                //}
            }
            else
            {
                Application.Run(new DatabaseConnection());                
            }
            //Application.Run(new Frm_BasicList());
        }
    }
}
